global infile "DataMain.dta"
global outfile "$results\Table 10"


* Table 10. Before-after estimates by bathroom and kitchen

use "$infile", clear 
keep if treated == 1 & dataset == 1
drop if logwbath == .
xtreg logwater treat i.moy, fe i(home) cluster(home)
leveleffects
outreg2 using "$outfile", keep(treat) nocon 2aster dec(3) word replace ///
addstat(pre, $prem, effect, $effectm, transbeta, $transbeta) 

use "$infile", clear 
replace water = wbath
replace logwater = logwbath
keep if treated == 1 & dataset == 1
xtreg logwater treat i.moy, fe i(home) cluster(home)
leveleffects
outreg2 using "$outfile", keep(treat) nocon 2aster dec(3) word ap ///
addstat(pre, $prem, effect, $effectm, transbeta, $transbeta) 

use "$infile", clear 
replace water = wkitchen
replace logwater = logwkitchen
keep if treated == 1 & dataset == 1
xtreg logwater treat i.moy, fe i(home) cluster(home)
leveleffects
outreg2 using "$outfile", keep(treat) nocon 2aster dec(3) word ap ///
addstat(pre, $prem, effect, $effectm, transbeta, $transbeta) 


